﻿<%@ Page Language="C#" MasterPageFile="~/Application/Application.Master" AutoEventWireup="true" CodeBehind="BlogPosts.aspx.cs" Inherits="BlogManager.Application.BlogPosts" %>

<asp:Content ID="Content2" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

	<h4>Blog posts&nbsp;<a href="<%=ResolveClientUrl("~/Application/Post.aspx") %>?SiteId=<%=Request.QueryString["SiteId"] %>">
        <asp:Image runat="server" ID="ImageButtonForAddingAPost" ImageUrl="~/Img/add.png"  /></a>
    </h4>
    <br />
	<asp:GridView runat="server" ID="GridViewForPosts" AutoGenerateColumns="false" CssClass="Grid" AlternatingRowStyle-CssClass="Alternating">    <Columns>        <asp:BoundField HeaderText="Title" DataField="Title" />        <asp:BoundField HeaderText="Published" DataField="PublicationDate" DataFormatString="{0:mm/dd/yyyy}" />        <asp:TemplateField HeaderText="Content">            <ItemTemplate>                <%# parseContent(Eval("Content").ToString())%>            </ItemTemplate>        </asp:TemplateField>        <asp:TemplateField>            <ItemTemplate>                <a href="<%=Page.ResolveClientUrl("~/Application/Post.aspx") %>?PostId=<%# Eval(BlogManager.Data.Entities.Blog_PostTable.IdColumn) %>&SiteId=<%=Request.QueryString["siteId"] %>">Edit</a>&nbsp;|&nbsp;                <a href="<%=Page.ResolveClientUrl("~/Application/BlogPosts.aspx") %>?PostId=<%# Eval(BlogManager.Data.Entities.Blog_PostTable.IdColumn) %>&SiteId=<%=Request.QueryString["siteId"] %>">Delete</a>            </ItemTemplate>                    </asp:TemplateField>    </Columns>    <EmptyDataTemplate>        No Blog-Posts available for the selected domain.    </EmptyDataTemplate>    </asp:GridView>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolderFor3rdColumn" Runat="Server">
</asp:Content>
